package com.example.administrator.daydayappmarket.software.choice.model;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2016/12/26.
 */

public class SoftwareChoiceAppsItem extends SoftwareChoiceParent {
    private List<SoftwareChoiceTopicApps> softwareChoiceTopicAppses;
    @Override
    public void parseJson(JSONObject jsonObject) throws JSONException {
        if (jsonObject != null) {
            theme_type=jsonObject.getString("theme_type");
            JSONArray jsonArray=jsonObject.getJSONArray("data");
            softwareChoiceTopicAppses=new ArrayList<>();
            for (int i = 0; i < jsonArray.length(); i++) {
                JSONObject jsonObject1=jsonArray.getJSONObject(i);
                SoftwareChoiceTopicApps softwareChoiceTopicApps=new SoftwareChoiceTopicApps();
                softwareChoiceTopicApps.parseJson(jsonObject1);
                softwareChoiceTopicAppses.add(softwareChoiceTopicApps);
            }
        }
    }

    public List<SoftwareChoiceTopicApps> getSoftwareChoiceTopicAppses() {
        return softwareChoiceTopicAppses;
    }
}
